﻿

using System.Numerics;

namespace SvCore.Tcp;


public partial class MyPackage
{
    public T? GetObj<T>() where T : class
        => Session.GetObj<T>();

    public MySession Session { get; set; }
    public int Send<T>(T msg, EProtocolResult ecode = EProtocolResult.成功) where T : gpb.IMessage
        => Session.Send(msg, ecode);
    public int Err(EProtocolResult ecode = EProtocolResult.成功, bool pop = false)
    {
        var msg = new G2CNtfMudErr() { Pop = pop };
        return Session.Send(msg, ecode);
    }
}
